Skip to content

fix!: Fix LicenseStatus response and Supportkey type#4297

Open
s4mur4i wants to merge 1 commit into
google:masterfrom
s4mur4i:master
Open

fix!: Fix LicenseStatus response and Supportkey type#4297
s4mur4i wants to merge 1 commit into
google:masterfrom
s4mur4i:master

Conversation

@s4mur4i

@s4mur4i s4mur4i commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: LicenseStatus.SupportKey type changed from *string to *bool and License return type is no longer a slice.

Closes: #4296

License status response was implemented according to documentation, which is not according to actual response.

Fix:
Corrected the response
Fixed incorrect data type for SupportKey
Fixed tests

@gmlewis gmlewis changed the title fix: Fix License Status response and Supportkey type fix!: Fix License Status response and Supportkey type Jun 12, 2026
@gmlewis gmlewis changed the title fix!: Fix License Status response and Supportkey type fix!: Fix LicenseStatus response and Supportkey type Jun 12, 2026
@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.46%. Comparing base (952dff0) to head (18fdd90).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4297   +/-   ##
=======================================
  Coverage   97.46%   97.46%           
=======================================
  Files         192      192           
  Lines       19258    19258           
=======================================
  Hits        18770    18770           
  Misses        270      270           
  Partials      218      218           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @s4mur4i!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra

//
//meta:operation GET /manage/v1/config/license
func (s *EnterpriseService) License(ctx context.Context) ([]*LicenseStatus, *Response, error) {
func (s *EnterpriseService) License(ctx context.Context) (*LicenseStatus, *Response, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a comment to the function that GitHub documentation is wrong about the response.

Seats *int `json:"seats,omitempty"`
SSHAllowed *bool `json:"sshAllowed,omitempty"`
SupportKey *string `json:"supportKey,omitempty"`
SupportKey *bool `json:"supportKey,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a comment that GitHub documentation is wrong about the actual type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect return and data type in license api

3 participants